var debugjs_frameCount = 0;
var debugjs_now = +new Date();

game.debug = true;

//
// prints out fps(frame per second)
//
var debugjs_printfps = function(e) {
    
    debugjs_frameCount++;
    if (+new Date() - debugjs_now > 5000) {
        var debugjs_fps = debugjs_frameCount / 5.0;
        Ti.API.info(debugjs_fps + " fps");

        debugjs_frameCount = 0;
        debugjs_now = +new Date();
    }
};

game.addEventListener('enterframe', debugjs_printfps);

quicktigame2d.addEventListener('onlowmemory', function(e) {
    Ti.API.warn("Low Memory");
});
